<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
    </head>
    <body>
        <button type="button" id="btn">小组抽奖</button>
        <p id="showName"></p>
        <script>
            let start = document.getElementById("btn");
            let p = document.getElementById("showName");

            start.onclick = function () {
                const arr = [
                    "韦文龙",
                    "魏龙",
                    "姚磊",
                    "黎飞",
                    "卢香瑞",
                    "陈佳佳",
                    "唐辅运",
                    "杨加鑫",
                ];
                let max = arr.length - 1;
                let min = 0;
                let rand = parseInt(Math.random() * (max - min + 1) + min);
                let newArray = arr[rand];
                p.innerHTML = '<h1 style="color: red;">' + newArray + "</h1>";
            };
        </script>
    </body>
</html>
